package edu.zli.redis.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author ZerlindaLi create at 2021/12/15 16:39
 * @version 1.0.0
 * @description User
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Long id;
    private String name;
    private Date birth;

    public static User buildUser(Long id) {
        User user = new User( Long.parseLong(id+""), "Zerlinda", new Date());
        return user;
    }

    public static List<User> buildUserList(){
        List<User> users = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            User user = new User( Long.parseLong(i+""), "Zerlinda", new Date());
            users.add(user);
        }
        return users;
    }
}
